<div class="container">

    <?php echo $this->element('page_header'); ?>

    <div class="row">
        <div class="span2">
            <?php echo $this->element('admin/navigation'); ?>
        </div>
        <div class="span10">

            <div class="widget">

                <div class="widget-header">
                    <h3>
                        <i class="icon-th-list"></i>
                        Create New User, Modify Existing User, Delete Ticket User.
                    </h3>
                </div> <!-- /widget-header -->

                <div class="widget-content">
                    <table id="flex" style="display:none;"></table>
                </div> <!-- /widget-content -->

                <div style="display: none;">
                    <div id="user-form-window" style="margin: 20px 5px 5px 5px;">
                        <div class="user-prompt" ></div>
                        <div class="widget">

                            <div class="widget-header">
                                <h3>
                                    <i class="icon-th-list"></i>
                                    Reset Password Form
                                </h3>
                            </div> <!-- /widget-header -->

                            <div class="widget-content">
                                <?php echo $this->Form->create('User', array('default' => false, 'id' => 'user-form','class'=>'form-horizontal', 'action' => 'add','inputDefaults' => array('label' => false,'div' => false)));?>
                                <fieldset>
                                    <div class="control-group">
                                        <label class="control-label" for="input01">New Password</label>
                                        <div class="controls">
                                            <?php echo $this->Form->input('password', array('id'=>'password', 'type'=>'password', 'class' => 'input validate[required] ', 'value'=>'', 'div' => false, 'label' => false,)); ?>
                                        </div>
                                    </div>

                                    <div class="form-actions">
                                        <button id="save-btn" type="submit" class="btn btn-primary btn-large">Save changes</button>
                                        <button id="cancel-btn" class="btn btn-large" type="button">Cancel</button>
                                        <?php echo $this->Form->input('id', array('id'=>'user_id', 'type'=>'hidden')); ?>
                                        <input type="hidden" name="url" id="reset-pass-url" value="<?php echo $this->Html->url(array('controller' => 'Admin', 'action' => 'users/reset_pass')); ?>">
                                    </div>
                                </fieldset>
                                <?php echo $this->Form->end();?>
                            </div> <!-- /widget-content -->

                        </div> <!-- /widget -->

                    </div>
                </div>

            </div> <!-- /widget -->

        </div>

    </div> <!-- /.row -->

</div> <!-- /.container -->

<!-- URLs -->
<!-- URLs -->
<input type="hidden" id="table-url" value="<?php echo $this->Html->url(array('controller' => 'Admin', 'action' => 'users/get')); ?>" />
<input type="hidden" id="table-editable-url" value="<?php echo $this->Html->url(array('controller' => 'Admin', 'action' => 'users/save')); ?>" />
<input type="hidden" id="table_delete_url" value="<?php echo $this->Html->url(array('controller' => 'Admin', 'action' => 'users/delete')); ?>" />
<input type="hidden" id="table-sub-load-url" value="<?php echo $this->Html->url(array('controller' => 'Admin', 'action' => 'users/sub-load')); ?>" />
<input type="hidden" id="table-sub-editable-url" value="<?php echo $this->Html->url(array('controller' => 'Admin', 'action' => 'users/sub-save')); ?>" />
<input type="hidden" id="table-sub_delete_url" value="<?php echo $this->Html->url(array('controller' => 'Admin', 'action' => 'users/sub-delete')); ?>" />

<script type="text/javascript">
    var groups = <?php echo json_encode($groups);?>;
</script>
<?php
    echo $this->Html->script('Scripts/admin/users.js');
?>